COM ATCSGT test - Get / Set Own greetings
COM V1.0	22.02.2005	T. Kleinmann	Started
COM V1.1	17.05.2005	T. Kleinmann	changed command to CSGT. ^SGRT not supported any more.
COM V1.2	24.06.2005	T. Kleinmann	Modified boundary test for at+csgt - limited to 16 characters

##########################################################################################
#ToDo(S3): Check returned modes from test and read command 
##########################################################################################

from attglobals import *

##########################################################################################

COM Test command
AT+CSGT=?
WAITFOR(1,'SGRT: ')

##########################################################################################

COM reset values
AT&F
WAIT FOR OK

COM Check default
AT+CSGT?
WAITFOR (1,'OK')

##########################################################################################

COM Write (Disable)
ATCSGT=0
WAIT FOR OK

COM Check 
AT+CSGT?
WAITFOR (1,'0')

##########################################################################################

COM Write (Enable)
AT+CSGT=1,"TEST"
WAIT FOR OK

COM Check 
AT+CSGT?
WAITFOR (1,'TEST')

##########################################################################################

COM Erroneous write command - Invalid mode
AT+CSGT=2
WAIT FOR ERROR

COM Check
AT+CSGT?
WAITFOR (1,'1')

##########################################################################################

COM Boundary write command - Long Greeting text
AT+CSGT=1,"Thisisaratherlonggreeting!"
WAIT FOR ERROR
COM Check
AT+CSGT?
WAITFOR (1,'Thisisaratherlonggreeting!')

##########################################################################################

COM Boundary write command - Greeting text 16 characters
AT+CSGT=1,"abcdefghijklmnop"
WAIT FOR ERROR
COM Check
AT+CSGT?
WAITFOR (1,'abcdefghijklmnop')

##########################################################################################